﻿
function Validate() {

    var obj_TempoNo = document.getElementById('ctl00_ctl00_ASPxSplitter1_Content_ContentSplitter_MainContent_popup_txtTempoNo_I');
    var obj_cmbWarehouse = document.getElementById('ctl00_ctl00_ASPxSplitter1_Content_ContentSplitter_MainContent_popup_cmbWarehouse_I');
    var obj_cmbDriver = document.getElementById('ctl00_ctl00_ASPxSplitter1_Content_ContentSplitter_MainContent_popup_cmbDriver_I');

    //var obj_DriverName = document.getElementById('ctl00_ctl00_ASPxSplitter1_Content_ContentSplitter_MainContent_popup_txtDriverName_I');
    //var obj_DriverName = document.getElementById('ctl00_ctl00_ASPxSplitter1_Content_ContentSplitter_MainContent_popup_txtDriverName_I');    
    //var obj_MobileNo = document.getElementById('ctl00_ctl00_ASPxSplitter1_Content_ContentSplitter_MainContent_popup_txtMobileNo_I');
    //var obj_EmailID = document.getElementById('ctl00_ctl00_ASPxSplitter1_Content_ContentSplitter_MainContent_popup_txtEmailID_I');
    var obj_AccessCode = document.getElementById('ctl00_ctl00_ASPxSplitter1_Content_ContentSplitter_MainContent_popup_txtAccessCode_I');
    var obj_AccessPwd = document.getElementById('ctl00_ctl00_ASPxSplitter1_Content_ContentSplitter_MainContent_popup_txtAccessPwd_I');

    if (obj_TempoNo.value == "")
    {
        alert('Kindly Specify Tempo No.')
        obj_TempoNo.focus();
        return false;
    }
    if (obj_cmbWarehouse.value == "--Select--")
    {
        alert('Kindly Select Warehouse.')
        obj_cmbWarehouse.focus();
        return false;
    }
    if (obj_cmbDriver.value == "--Select--") {
        alert('Kindly Select Driver.')
        obj_cmbDriver.focus();
        return false;
    }
    //if (obj_DriverName.value == "") {
    //    alert('Kindly Specify Driver Name.')
    //    obj_DriverName.focus();
    //    return false;
    //}
    //if (obj_MobileNo.value == "") {
    //    alert('Kindly Specify Mobile No.')
    //    obj_MobileNo.focus();
    //    return false;
    //}

    //var obj = obj_EmailID;
    //var regex = /^[a-zA-Z0-9._-]+@([a-zA-Z0-9.-]+\.)+[a-zA-Z0-9.-]{2,4}$/;

    //if (obj_EmailID.value != "") {
    //    if (regex.test(obj.value)) {

    //    }
    //    else {
    //        alert('Please Enter Valid Email ID.')
    //        obj_EmailID.focus()
    //        return false;
    //    }
    //}
    if (obj_AccessCode.value == "") {
        alert('Kindly Specify Access Code.')
        obj_AccessCode.focus();
        return false;
    }
    if (obj_AccessPwd.value == "") {
        alert('Kindly Specify Access Password.')
        obj_AccessPwd.focus();
        return false;
    }

    var r = confirm("Are you sure ??? ");
    if (r) {
    }
    else {
        return false
    }
    return true;
}